﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Timers;

namespace _020_021_022事件详解_1
{
    internal class Program
    {
        static void Main(string[] args)
        {
            Timer timer = new Timer();
            Boy boy = new Boy();
            Girl girl = new Girl();
            timer.Interval = 1000;
            timer.Elapsed += boy.action;
            timer.Elapsed += girl.action;
            timer.Start();
            Console.ReadLine();
        }
    }

    class Boy
    {
        internal void action(object sender, ElapsedEventArgs e)
        {
            Console.WriteLine("Jump");
        }
    }

    class Girl
    {
        internal void action(object sender, ElapsedEventArgs e)
        {
            Console.WriteLine("Sing");
        }
    }
}
